<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width,height=device-height,maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta charset="UTF-8">
    <link rel="shortcut icon" href="/wolive.ico" />
    <title>主页</title>

    {load href="__libs__/layui/css/layui.css"/}
    {load href="__libs__/jquery/jquery.min.js"/}
    {load href="__libs__/layui/layui.js"/}
    {load href="__libs__/push/pusher.min.js"/}
    {load href="__libs__/layer/layer.js"/}
    {load href="__libs__/jquery/jquery.cookie.js"/}

<style>
   .tab-box{
     width: 100%;height: 120px;border: 1px solid #ddd;position: relative;margin-top: 20px;
   }

   .line-top{
     width: 100%;height: 80px;border-bottom: 1px solid #ddd;line-height: 30px;
   }

   .data_title{
     position: absolute;top: 10px;text-align: center;width: 100%;
   }

   .data_content{
    position: absolute;top: 40px;text-align: center;width: 100%;font-size: 40px;
   }

   .line-end{
     background: #ddd;width: 100%;height: 40px;
   }

  .line-end-content{
    position: absolute;bottom: 10px;width: 100%;text-align: center;
   }

  .notice{
    display: inline-block;height: 12px;border-radius: 12px;position: absolute;right: 5px;top: 5px;
   }

  .hide{
    display: none;
   }

</style>
</head>
<body>
<section>
    <header style="width: 100%;height: 50px;position: relative;border-bottom:1px solid #ddd;box-shadow: 0 0 1px #ccc;background: #fff; ">
        <div style="position: absolute;left: 20px;top:5px;">
            <a href="https://www.wolive.cc">
                <img src="__image__/index/juanpao_logo.png" width="40px" style="border-radius: 10px;" />
            </a>
       </div>

      <div style="position: absolute;left: 80px;top: 10px;font-size: 20px;">
        <a href="https://www.wolive.cc">客服系统</a>
      </div>
      
     <div class="layui-nav-item" style="position: absolute;right: 5px;top: 5px;">
        <a href="javascript:show();" style="color: #b2b2b2;"><i class="layui-icon" style="font-size: 40px;">&#xe60f;</i></a>
        <dl class="layui-nav-child" style="left:-65px;min-width: 100px;">
          <dd style="text-align: center;"><a href="/mobile/admin/chat">对话平台</a></dd>
          <dd style="text-align: center;"><a href="/mobile/admin/message">留言列表</a></dd>
        </dl>
     </div>
   <span id='wolive_notice' class="layui-badge notice hide"></span>
  </header>

  <div style="width: 90%;margin:20px auto;">
    <div class="layui-row" >

      <div class="layui-col-xs12 tab-box" >
         <div class="line-top" >
            <p class="data_title">正在咨询人数</p>       
            <p class="data_content">{$talks}</p>
         </div>
         <div class="line-end">
             <p class="line-end-content">当前客服在线数:<span>{$services}</span></p>
         </div>
      </div>
      
      <div class="layui-col-xs12 tab-box" >
         <div class="line-top" >
            <p class="data_title">正在排队人数</p>       
            <p class="data_content">{$waits}</p>
         </div>
         <div class="line-end">
             <p class="line-end-content">接入总人数:<span>{$getinall}</span></p>
         </div>
      </div>

      <div class="layui-col-xs12 tab-box" >
         <div class="line-top" >
            <p class="data_title">今日会话量</p>       
            <p class="data_content">{$nowchats}</p>
         </div>
         <div class="line-end">
             <p class="line-end-content">会话总量:<span>{$chatall}</span></p>
         </div>
      </div>

     <div class="layui-col-xs12 tab-box" >
         <div class="line-top" >
            <p class="data_title">今日留言量</p>       
            <p class="data_content">{$nowmsg}</p>
         </div>
         <div class="line-end">
             <p class="line-end-content">留言总量:<span>{$msgall}</span></p>
         </div>
      </div>
 
    </div> 
  </div>

</section>
<script>

  var WEB_SOCKET_SWF_LOCATION = "/assets/libs/web_socket/WebSocketMain.swf";
  var WEB_SOCKET_DEBUG = true;
  var WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR = true;
  
  var config={
       'app_key':'{$app_key}',
       'web_host':'{$whost}',
       'web_port':'{$wport}',
       'value':'{$value}',
       'business_id':'{$user["business_id"]}',
       'service_id':'{$user["service_id"]}',
       'voice_state':'{$voice}',
       'voice_address':'{$voice_address}'
  };


  var show =function(){
    var value =$('.layui-nav-child').css('display');

    if(value == 'block'){

        $('.layui-nav-child').css('display','none');
    }else{

       $('.layui-nav-child').css('display','block'); 
    }  
  }

</script>
<script src='/assets/js/connect.js'></script>

</body>

</html>
